package com.framework.exception.exception;

import lombok.Getter;

/**
 * 自定义业务异常枚举类
 */
public enum BusinessExceptionEnum {

    /**
     * 用户不存在
     * 用户名重复
     * 用户年龄异常
     */

    USER_NOT_EXIST(10001, "用户不存在"),
    USER_NAME_EXIST(10002, "用户名重复"),
    User_AGE_ABNORMAL(10003, "用户年龄异常")
    ;

    @Getter
    private Integer code;
    @Getter
    private String msg;

    BusinessExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
